package com.hsc.www.validator.test5;

import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Validated
@Service
public class PeopleServices {

    String addPeople(@NotEmpty(message = "id不能为空") String id,
                     @NotNull(message = "people不能为空") @Valid People people) {
        return people.toString();
    }

}
